package com.gwz.sys.mapper;

import java.util.List;

import com.gwz.sys.domain.Permission;
import com.gwz.sys.vo.PermissionVo;

public interface PermissionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Permission record);

    int insertSelective(Permission record);

    Permission selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Permission record);

    int updateByPrimaryKey(Permission record);
    
    List<Permission> queryAllPermission(Permission permission);

	Integer queryMaxOrderNumber();

	Integer isCurrentPermissionHasChildrenNode(Integer id);
	
	//根据角色id查询角色拥有的权限和菜单
	List<Permission> queryPermisionByRoleIdForList(Integer id);
	//根据userid查询菜单和权限
	List<Permission> queryPermissionByUserId(String type,Integer id);
}